package 考题_K.递归求N阶乘_K1;

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int result = getFactorial(n);
		System.out.println(result);
	}
	
	public static int getFactorial(int n){
		if(n > 0){
			return n*getFactorial(n-1);
		}else{
			return 1;
		}
	}
}
